package StudyCode.summary.myfile;

import java.nio.file.*;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingStandardWatchEventKinds {
	public static void main(String[] args) throws Exception {
		Path path = Paths.get("E:/Copy");
		WatchService watchService = FileSystems.getDefault().newWatchService();

		path.register(watchService,
				StandardWatchEventKinds.ENTRY_CREATE,
				StandardWatchEventKinds.ENTRY_MODIFY,
				StandardWatchEventKinds.ENTRY_DELETE,
				StandardWatchEventKinds.OVERFLOW);
		watchService.close();
	}
}
